//cards.h
#ifndef _CARDS_H
#define _CARDS_H
#include <iostream>
#include <string>

//Random number generator
#include <ctime>
#include <cstdlib>


//cards.h
//is header file for a poker card, each card consists of a suit and a value.
//cards will be created from the deck class
using namespace std;
class Cards
{
 public:
  enum Suit {wildCard=0, spades, clubs, diamonds, hearts};
  enum Value {joker=0, ace, two, three, four, five, six, seven, eight, nine, ten, jack, queen, king}; //joker=0, ace=1  
 
  Cards(); //constructor for default card
  // Creates a new joker card
  // Preconditions: none
  // Postconditions: new card created with value of 0 (joker) and a suit of 0 (wildcard). Is also visible.
  // Exceptions: none
  Cards(int value, Cards::Suit suit); //card constructor with value & suit
  // creates a new card with the specified value and suit
  // Preconditions: input value is 1-13 and input suit is 1-4
  // Postconditions: card initialized with correct value and suit
  // Exceptions: none, NOTE: update so that exception thrown if current precondition definition is not met
  int GetValue() const; 
  //returns int value for card 1 for ace, 2, 3, ...
  // Preconditions: card has been initialized
  // Postconditions: intValue returned
  // Exceptions: none

  int GetSuit() const;
  //returns int suit for card
  // Preconditions: card has been initialized
  // Postconditions: intSuit returned
  // Exceptions: none

  string StringSuit() const;
  //returns the suit for card in the form of a string
  // Preconditions: card has been initialized
  // Postconditions: Suit returned in form of string
  // Exceptions: none

  string ValueString() const;
  //returns the value as a string for display king, queen, etc

  bool SameSuit(const Cards& card);
  //Checks the parameter (Card) to see if it has the same suit as the card that called the method
  // Preconditions: Card has been initialized, Parameter must be Card
  // Postconditions: bool (true/false) returned
  // Exceptions: none

  string StringCard();
  //converts a card to a string
  // Preconditions: Card has been initialized, Parameter must be Card
  // Postconditions: bool (true/false) returned
  // Exceptions: none

  bool Joker() const;
  //checks the card to see if it is a joker and returns a boolean value corresponding to that value
  // Preconditions: card is initialized
  // Postconditions: returns boolean value true if card is joker, else false
  // Exceptions: none

 private:
  Suit thisSuit;
  Value thisValue;
  int intValue;
  int intSuit;
  int visible; // 0=face down, one invisible to all, two visible to player, three visible to everyone
};

#endif
